package com.sc.nft.entity.dto;

import com.sc.nft.entity.MallMemberEquityTemplate;
import com.sc.nft.enums.MallMemberEquityTypeEnum;
import com.sc.nft.util.Beans;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 中后台商城权益模板分页查询DTO
 *
 * @Author：LiGen
 * @Package：com.sc.nft.entity.dto
 * @Project：sc_metago
 * @name：MemberEquityTemplateDTO
 * @Date：2024/4/3 14:15
 * @Filename：MemberEquityTemplateDTO
 */
@Data
public class AdminMemberEquityTemplateDetailDTO {

    @ApiModelProperty(value = "权益模板Id")
    private Long id;

    @ApiModelProperty(value = "会员权益类型")
    private MallMemberEquityTypeEnum type;

    @ApiModelProperty(value = "权益名称")
    private String equityName;

    @ApiModelProperty(value = "领取限制周期[FULL-整个周期, PRE_DAY-每天,PRE_WEEk-每周,PRE_MONTH-每月,PRE_YEAR-每年]")
    private String receiveCycle;

    @ApiModelProperty(value = "用户限领数量")
    private Integer limitCountPerUser;

    @ApiModelProperty(value = "是否有领取周期限制  0:没有 1:有")
    private Boolean receiveTimeRule;

    @ApiModelProperty(value = "优先抢提前时间 单位：分钟")
    private Integer prioritizeTheLeadTime;

    @ApiModelProperty(value = "权益是否叠加  0:否 1:是")
    private Boolean superpositionInterests;

    @ApiModelProperty(value = "权益图标")
    private String equityIcon;

    @ApiModelProperty(value = "权益详情")
    private String equityDetails;

    @ApiModelProperty(value = "开启状态")
    private Boolean status;

    public static AdminMemberEquityTemplateDetailDTO build(MallMemberEquityTemplate mallMemberEquityTemplate) {
        AdminMemberEquityTemplateDetailDTO adminMemberEquityTemplateDetailDTO = new AdminMemberEquityTemplateDetailDTO();
        Beans.copyProperties(mallMemberEquityTemplate, adminMemberEquityTemplateDetailDTO);
        return adminMemberEquityTemplateDetailDTO;
    }
}
